$(document).ready(function() {
	initTemplate();
	$("#nav_next").click(function() {
		save();
	});
	$("#nav_back").click(function() {
		back();
	});
});
/**
 * 初始化模板
 */
function initTemplate() {
	shouldShowbottom();
};
//判断编辑状态还是展示状态
function shouldShowbottom() {
	var showBottom = $("#static").val();
	var container = $("#container");
	var height = 0;
	if (showBottom == '') {
		height = $(window).height() - 47;
	} else {
		height = $(window).height();
	};
	container.height(height);
}
//保存成功后,返回
function save() {
	$('#save_pro').submit();
	//window.location.href = "template1index.html";
}
//返回上个界面
function back() {
	window.history.back();
}